﻿using BitTorrent.Agents;
using BitTorrent.Agents.Messages;
using Microsoft.Ccr.Core;

namespace BitTorrent.Client.Peer
{
    internal class PeerListenerAgent : AgentBase
    {
        TcpAcceptorAgent _peerAcceptor;
        /// <summary>
        /// Initializes a new instance of the PeerListenerAgent class.
        /// </summary>
        public PeerListenerAgent(DispatcherQueue dispatcherQueue) : base(dispatcherQueue) {
            _peerAcceptor = new TcpAcceptorAgent(dispatcherQueue);
            _peerAcceptor.Port.Post(new ListenOn{Port = 6889, Backlog = 100});
        }
    }
}